class QuestionType < ActiveRecord::Base
	include AliasingColumns

  	set_table_name "QUESTION_TYPES"
	AliasingColumns.add_aliases columns
		
	has_many :questions,
			 :class_name => "Question",
			 :foreign_key => "type_id"
	
	
	
	if  AliasingColumns.get_adapter_name == "oracle"
	#	self.primary_key ="ID"
		set_sequence_name table_name()<<"_SEQ" 
	#	before_create :set_id
		def set_id
			 self.ID =connection.next_sequence_value(self.class.sequence_name)	
		end 
	end
	
	
end
